package test.entity;

import mock.entity.Person;
import org.junit.Assert;
import org.junit.Test;

/**
 *
 * @author vladimir 04.09.2013   16:05
 */
public class PersonTestCase extends Assert {

    @Test
    public void testEquals() throws Exception{
        Person person = new Person();
        person.setArtist("Vova");
        person.setTitle("Human");
        person.setCompany("OTR");
        person.setPrice("100500");
        person.setYear("1988");

        Person person2 = new Person();
        person2.setArtist("Vasa");
        person2.setTitle("Animal");
        person2.setCompany("OTR");
        person2.setPrice("1005002");
        person2.setYear("1989");

        assertFalse(person.equals(person2));

        person2 = new Person();
        person2.setArtist("Vova");
        person2.setTitle("Human");
        person2.setCompany("OTR");
        person2.setPrice("100500");
        person2.setYear("1988");

        assertEquals(person,person2);
    }
}
